package com.ruoyi.project.travel.domain;

import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.MbEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import lombok.Data;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 订单 对象 tr_order
 *
 * @author ruoyi
 * @date 2020-06-14
 */
@Data
@TableName("tr_order")
@ApiModel(value="tr_order对象", description="订单 ")
public class Order extends MbEntity {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private Long id;

    @Excel(name = "订单编号")
    @TableField("order_id")
    @ApiModelProperty(value = "订单编号")
    private String orderId;

    @Excel(name = "景点编号")
    @TableField("scenic_id")
    @ApiModelProperty(value = "景点编号")
    private Long scenicId;

    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") //格式化前台日期入参注解
    @TableField("start_time")
    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") //格式化前台日期入参注解
    @TableField("finish_time")
    @ApiModelProperty(value = "结束时间")
    private Date finishTime;

    @Excel(name = "购买价格")
    @TableField("price")
    @ApiModelProperty(value = "购买价格")
    private Double price;

    @Excel(name = "类型 ")
    @TableField("type")
    @ApiModelProperty(value = "类型 ")
    private Long type;

    @Excel(name = "备注")
    @TableField("remark")
    @ApiModelProperty(value = "备注")
    private String remark;

    @Excel(name = "订单状态 -1：取消订单，0：待支付，1：待核销，2：已核销，3：已结束")
    @TableField("state")
    @ApiModelProperty(value = "订单状态 -1：取消订单，0：待支付，1：待核销，2：已核销，3：已结束")
    private Long state;

    @Excel(name = "用户编号")
    @TableField("user_id")
    @ApiModelProperty(value = "用户编号")
    private Long userId;

    @TableField("applied_time")
    @ApiModelProperty(value = "核销时间")
    private Date appliedTime;

    @TableField("update_time")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    @Excel(name = "生成时间", width = 30, dateFormat = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") //格式化前台日期入参注解
    @TableField("creat_time")
    @ApiModelProperty(value = "生成时间")
    private Date creatTime;

    @ApiModelProperty(value = "景区名称")
    @TableField(exist = false)
    private String name;

    @ApiModelProperty(value = "用户名称")
    @TableField(exist = false)
    private String userName;


}
